<?php

require_once $GLOBALS['ROO'] . 'Modules/Geo/class.geo.php';
if (isset($_GET['Field'])) {
    $Select = new Geo();
    if ($_GET['Field'] == 'Country') {
        #Pais 
        $Return = $Select->GetCountry($_GET['Country'], $_GET['FieldName'],'Child','Subchild', null, $_GET['Region'], $_GET['Target'], $_GET['SubTarget'], '', 'ED');
    }
    if ($_GET['Field'] == 'Region') {
        #Regiao
        $Return = $Select->GetRegion($_GET['Region'], $_GET['FieldName'],$_GET['Child'], $_GET['Country'], 0, $_GET['Target'], $_GET['Mode']);
    }
    if ($_GET['Field'] == 'City') {
        #Cidade 
        $Return = $Select->GetCity(0, $_GET['FieldName'], $_GET['Region'], $_GET['Country'], 'ED');
    }
    echo $Return;
}
?>
